#include <iostream>
#include <cstring>
typedef long long ll;
using namespace std;
int main(){
    int len,cou,a,b;
    cin>>len>>cou;
    long long t;
    while (cou--){
        cin>>t;
        if (t%2==0){
            cout<<t/2+1<<endl;
        } else{

        }
    }
    return 0;
}